Skip to content

Conversation

@anukalp2804
Copy link
Contributor

@anukalp2804 anukalp2804 commented Dec 21, 2025

Summary:
This pull request documents the rationale for deprecating the Artifact version
constants RELEASE and LATEST.

Why:
The RELEASE and LATEST version constants lead to non-reproducible builds and are
discouraged in Maven 4. This change makes the reason for deprecation explicit
and provides guidance on preferred alternatives.

What:

  • Added JavaDoc explaining why these constants are deprecated
  • Clarified recommended usage of explicit versions or version ranges

Scope:

  • Documentation-only change
  • No behavioral or API changes

Testing:

  • mvn verify (BUILD SUCCESS)

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Your pull request should address just one issue, without pulling in other changes.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
    This may not always be possible but is a best-practice.
  • Run mvn verify to make sure basic checks pass.
    A more thorough check will be performed on your pull request automatically.
  • You have run the Core IT successfully.

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@anukalp2804
Copy link
Contributor Author

Hi, just a gentle reminder. Whenever you get time, please take a look.
No hurry. Thank you!

@anukalp2804
Copy link
Contributor Author

Just checking in on this PR. It has been idle for a while and is still awaiting workflow approval and review.

* @deprecated since 4.0.0.
* The use of the {@code RELEASE} version is discouraged because it results
* in non-reproducible builds.
* Use an explicit version or a version range instead.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never use a version range foe the same reasons. Explicit versions only

public interface Artifact extends Comparable<Artifact> {

/**
* @deprecated since 4.0.0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need since 4.0.0.?

* @deprecated since 4.0.0.
* The use of the {@code LATEST} version is discouraged because it results
* in non-reproducible builds.
* Use an explicit version or a version range instead.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds comprehensive JavaDoc documentation to explain the rationale for deprecating the RELEASE and LATEST version constants in the Maven Artifact interface. The constants were previously marked as deprecated in Maven 4.0.0, but lacked explanation.

Changes:

  • Added detailed JavaDoc comments explaining that RELEASE and LATEST version constants lead to non-reproducible builds
  • Provided guidance to use explicit versions or version ranges instead

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants